<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>用户中心</title>
	<link rel="stylesheet" type="text/css" href="../../static/news/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../../static/news/css/jquery.pagination.css">
    <link rel="stylesheet" type="text/css" href="../../static/news/css/main.css">
    <script type="text/javascript" src="../../static/news/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="../../static/news/js/jquery.pagination.min.js"></script>
</head>
<body class="inframe_body">
    <div class="my_collect">
        <h3>我的收藏</h3>
        <ul class="article_list">
            {% for i in data.cur_page_news_list %}
            <li><a href="/news_datail/{{ i.id }}">{{ i.title }}</a><span>{{ i.create_time }}</span></li>
            {% endfor %}
        </ul>
        <div id="pagination" class="page"></div>
        <script>
            $(function() {
                $("#pagination").pagination({   // 这个pagination方法专门用来显示前端页码
                    currentPage: {{ data.cur_page }},     // 在前端设置当前页码
                    totalPage: {{ data.total_page }},       // 在前端设置总页码
                    callback: function(current) {
                        //点击页码中的按钮，执行这里的代码
                        // current表示当前页码
                        location.href = "/user/collection?p=" + current
                    }
                });
            });
        </script>

    </div>
</body>
</html>